import request from '@/utils/request'

export default {
  getLastNames() {
    return request({
      url: '/visualization/index/nameWordCloud',
      method: 'get',
    })
  },
  getNameWordCloudImg() {
    return request({
      url: '/visualization/index/getNameWordCloudImg',
      method: 'get',
    })
  },
  getAgeDistribution() {
    return request({
      url: '/visualization/index/getAgeDistribution',
      method: 'get',
    })
  },
  getFigureCity() {
    return request({
      url: '/visualization/index/getFigureCity',
      method: 'get',
    })
  },
  getSexRatio() {
    return request({
      url: '/visualization/index/getSexRatio',
      method: 'get',
    })
  },
  getFigureTypes() {
    return request({
      url: '/visualization/index/getFigureTypes',
      method: 'get',
    })
  },
  getFigureInfo(figureId) {
    return request({
      url: `/visualization/historyfigure/getFigureInfo/${figureId}`,
      method: 'get',
    })
  },

  getMinMaxYear() {
    return request({
      url: `/visualization/index/getMinMaxYear`,
      method: 'get',
    })
  },
  //在时间和城市的条件下，获取姓氏数据
  getNameWordCloudByTimeCity(timeCity) {
    return request({
      url: `/visualization/index/nameWordCloudByTimeCity`,
      method: 'post',
      data:timeCity
    })
  },
  //在时间和城市的条件下，获取年龄分布
  getAgeDistributionByTimeCity(timeCity) {
    return request({
      url: `/visualization/index/getAgeDistributionByTimeCity`,
      method: 'post',
      data:timeCity
    })
  },
  //在时间条件下，获取人物所属城市
  getFigureCityByTime(timeCity) {
    return request({
      url: `/visualization/index/getFigureCityByTime`,
      method: 'post',
      data:timeCity
    })
  },
  //在时间和城市条件下，获取人物性别比例
  getSexRatioByTimeCity(timeCity) {
    return request({
      url: `/visualization/index/getSexRatioByTimeCity`,
      method: 'post',
      data:timeCity
    })
  },
  //在时间和城市的条件下，获取人物的类型
  getFigureTypesByTimeCity(timeCity) {
    return request({
      url: `/visualization/index/getFigureTypesByTimeCity`,
      method: 'post',
      data:timeCity
    })
  },
  //获取历史人物所有的经纬度
  getFigureLocAndLat() {
    return request({
      url: `/visualization/index/getFigureLocAndLat`,
      method: 'get',
    })
  },
}
